// static MY_STATIC: i32 = 50;
// static mut MY_MUT_STATIC: i32 = 50;

fn main() {
    // let 基础使用以及作用域
    /* let nice_count: i32 = 23;
    let nice_number: i64 = 64;

    println!("nice_count:{nice_count}");

    {
        let nice_number: i32 = 50;
        println!("inner nice_number:{}", nice_number)
    }

    println!("outer nice_number:{nice_number}");

    let nice_number: &str = "hello";
    println!("{nice_number}");

    let mut mut_str: &str = "123";
    println!("{mut_str}");
    mut_str = "3";
    println!("{mut_str}"); */

    // const、static 基础使用
    /* const SECOND_HOUR: usize = 3_600;
    println!("{}", SECOND_HOUR);

    println!("{}", MY_STATIC);

    unsafe {
        MY_MUT_STATIC = 60;
        println!("{}", MY_MUT_STATIC);
    }; */

    let a: i32 = -50;
    println!("{a}");
    println!("u32  max : {}", u32::MAX);
    println!("u32  min : {}", u32::MIN);
    println!("i32  max : {}", i32::MAX);
    println!("i32  min : {}", i32::MIN);
    println!("usize  max : {}", usize::MAX);
    println!("usize  min : {}", usize::MIN);
    println!("isize  max : {}", isize::MAX);
    println!("isize  min : {}", isize::MIN);

    println!("isize is {} bytes", std::mem::size_of::<isize>());

    let f1: f32 = 1.23456789;
    let f2: f64 = 2.88888888;
    println!("Float are {:.2} {:.2}", f1, f2);

    let bool_false: bool = false;
    let bool_true: bool = true;

    println!("{} {}", bool_false || bool_true, bool_false && bool_true);

    let char_c: char = 'C';
    let emo_char: char = '😀';

    println!("You get {} feel {}", char_c, emo_char);
    println!("{}", emo_char as usize);
    println!("{}", emo_char as i64);
}
